#include <utility>
#include "dspSimulator/register/controlRegister.h"

namespace dspsimulator {
    CReg::CReg(std::string name, u32 mask) {
        m_name = std::move(name);
        m_mask = mask;
        m_data = 0;
    }

    u32 *CReg::get_data_ptr() {
        m_data &= m_mask;
        return &m_data;
    }

    void CReg::set_data(u32 data) {
        data &= m_mask;
        m_data = data;
    }
}